<!doctype html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link href="../css/mui.min.css" rel="stylesheet" />
	</head>

	<body style="background-color: #fff;">
		<header class="mui-bar mui-bar-nav">
			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
			<h1 class="mui-title">登陆</h1>
		</header>
		<!--<div class="mui-content" style="margin-top: 5%;">
		<!--	<!--<div class="mui-input-row">
			    <label>类型：</label>
			    <input type="text" placeholder="用户、媒体、众创空间">
			</div>-->-->
			
			<!--<div class="mui-input-row">
				<label>用户名：</label>
				<input id="input_uname" type="text" placeholder="请输入用户名">
			</div>
			<div class="mui-input-row">
				<label>密码：</label>
				<input id="input_pwd" type="password" placeholder="请输入密码">
			</div>
			
			<button id="btn_login" type="button" class="mui-btn mui-btn-blue" style="margin-left: 40%;margin-right: 40%;width: 20%;margin-top: 10%;">登陆</button>
			<button id="btn_register" type="button" class="mui-btn mui-btn-blue" style="margin-left: 40%;margin-right: 40%;width: 20%;margin-top: 5%;">注册</button>
			
		</div>-->-->
		<form class="mui-input-group" >
			<br />
				<div class="mui-input-row" style="margin-top: 2%;">
		        	<label>用户名</label>
		    		<input id="input_uname" type="text" class="mui-input-clear" placeholder="请输入用户名">
		    	</div>
		   		 <div class="mui-input-row" style="margin-top: 2%;">
		       		 <label>密码</label>
		       		 <input id="input_pwd" type="password" class="mui-input-password" placeholder="请输入密码">
		  	  	</div>
		    	<div class="mui-button-row" style="margin-top: 3%; " >
		        	<button id="btn_login" type="button" class="mui-btn mui-btn-primary" style="margin-right: 5%;">登陆</button>
		        	<button id="btn_register" type="button" class="mui-btn mui-btn-danger" >注册</button>
		    	</div>
			</div>
		   
		</form>

		<script src="../js/mui.min.js"></script>
		<script src="../js/initData.js"></script>
		<script type="text/javascript">
			mui.init();
			mui.plusReady(function() {
				document.getElementById("btn_register").addEventListener("tap", function() {
					plus.webview.open("register_page.html");
					plus.webview.currentWebview().close();
				});
				document.getElementById("btn_login").addEventListener("tap", function() {
					var uname = document.getElementById("input_uname").value;
					var pwd = document.getElementById("input_pwd").value;
					console.log("uname=" + uname + ",pwd=" + pwd);
					login(uname, pwd);
				});
			});
		</script>
	</body>

</html>